
		
		**********************************************************
		** File: Figure E2.do									**
		** Paper: Human Trafficking Indicators: A New Dataset	**
		** Author: Richard Frank								**
		** Date: July 11, 2021									**
		** Task: Creating Figure E2 							**
 		**********************************************************
	
			clear
			version 16.1
			set max_memory 32g, permanently
			set seed 1234
			set level 95 		
			set scheme lean1
			
			cd "~/"
 
			**************
			*** 1. GDP ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="gdp"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.25(.25)1,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title(GDP) ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save gdp.gph, replace
		
		
	
			*********************
			*** 2 languageave ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="languageave"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.25(.5)3,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("Lang. fract.") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save lan.gph, replace
		
				
		
			********************
			*** 3 tourismave ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="tourismave"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.25(.25).75,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("Tourism") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save tou.gph, replace
		
				
			***************************
			*** 4  legal_britishave ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var==" legal_britishave "
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.75(.25)1.75,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("Legal, British") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save bri.gph, replace
		
				
			****************
			*** 5 French ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="french"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.25(.25)1.25,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("French") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save fre.gph, replace
					
					
			**************
			*** 6 oecd ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="oecd"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.5(.25)1.75,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("OECD") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save oec.gph, replace
					
					
			**************************
			*** 7 peacekeeperslave ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="peacekeeperslave"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.05(.05).2,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("Peacekeepers, source") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save pes.gph, replace
					
					
			*********************
			*** 8 refugeesave ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="refugeesave"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.05(.05).25,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("Refugees") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save ref.gph, replace
					
							
			***********************
			*** 9 easia_pacific ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="easia_pacific"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-1(.5)2,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("E Asia & Pacific") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save eas.gph, replace
					
							
			******************
			*** 10 english ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="english"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.5(.5)1.5,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("English") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save eng.gph, replace
					
							
						
			***********************
			*** 11 Ethnic fract ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="ethnicave "
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-1.5(.5)1.5,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("Ethnic fract.") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save eth.gph, replace
					
			***********************
			*** 12 execrightave ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="execrightave"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.5(.5)1.5,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("Exec. right") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save exr.gph, replace
					
							
			****************************
			*** 13 peacekeepersflave ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="peacekeepersflave"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-4(1)5,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("Peacekeepers, foreign") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save pef.gph, replace
					

			*********************
			*** 14 population ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="popave"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.2(.1).7,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("Population") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save pop.gph, replace		
			
			
			*********************
			*** 15 preventave ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="preventave"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.2(.1).5,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("Prevention") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save pre.gph, replace		
						
			
			***********************
			*** 16 KOFSoGIave   ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="KOFSoGIave"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.07(.02).07,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("Social globalization") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save sog.gph, replace		
						
			******************
			*** 17 trade   ***
			
			use eba_results.dta, clear
			
			keep variable  var round lower_eb upper_eb mean 
			keep if var=="tradeave"
			 
			gen order=.
			replace order=4 if round=="UNODC"
			replace order=3 if round=="DEST"
			replace order=2 if round==	"LDEST"
			replace order=1 if round=="PDEST"
	 
	 
	 	    twoway (rcap lower_eb upper order  ,   horizontal		///
			msize(small) lwidth(vthin) ), 					///
			xline(0, lcolor(cranberry) lwidth(vthin)) 					///  
			xlabel(-.07(.02).07,  labsize(small)) 				///
			xtitle("") 							///
			ylabel(1 "P" 2 "L" 3 "D" 4 "U")  ///
			ytitle("") ///	
			title("Trade") ||  /// 			 
			(scatter order mean if order==1 ,   msize(medium)  msymbol(D) mcolor(blue) legend(off)) ///
			(scatter order mean if order==2 ,   msize(medium)  msymbol(O) mcolor(green) legend(off)) ///
			(scatter order mean if order==3 ,   msize(medium)  msymbol(T) mcolor(cranberry) legend(off)) ///
			(scatter order mean if order==4 ,   msize(medium)  msymbol(S) mcolor(black) legend(off)) 
			graph save tra.gph, replace		
	
		
		graph combine gdp.gph lan.gph tou.gph bri.gph fre.gph oec.gph pes.gph ///
			ref.gph eas.gph eng.gph eth.gph exr.gph pef.gph pop.gph pre.gph ///
			sog.gph tra.gph, saving(ht_coef.gph)
 
	 

		
		
		
